﻿@model Yglab.Models.Gui_Versionn

@if (Model.DisplayingVersionn.State == 2)
{
    if(Model.EvaluationOfRefree == null){
        using (Html.BeginForm("EvaluateTheArticle", "Journal", FormMethod.Post, new { @class = "form-horizontal" }))
        {
        
            @Html.Hidden("journalpath", Model.DisplayingVersionn.Article.Journal.PathName)
    
            @Html.Hidden("id", Model.DisplayingVersionn.Id)
        
            int i = 1;
        
            foreach (Yglab.Models.Question q in Model.DisplayingVersionn.Article.Journal.Questions)
            {
                <h6>@i : @q.QuestionText</h6>
            
                @Html.Hidden("["+(i-1)+"].key", q.Id)  
        
                <b>yes</b>      
                @Html.RadioButton("["+(i-1)+"].value", 1, true)
                <b>no</b>
                @Html.RadioButton("["+(i-1)+"].value", 2, false)

                i++;
            }
            
            <br />
            @Html.TextArea("opinion", "", new { @placeholder = "Düşünceleriniz?.." })
            <br />
    
            <button type="submit" class="btn">Değerlendir</button>
        }
    }
    else if (Model.EvaluationOfRefree != null)
    {
        <b>Değerlendirme yapmıştınız..</b>
    
        foreach (Yglab.Models.Answer ans in Model.EvaluationOfRefree.Answers)
        {
            <h6> @ans.Question.QuestionText </h6>
            @ans.Result
        }
        <br />
        <b>Yorumunuz:</b> <br /> @Model.EvaluationOfRefree.Opinion
    }
}
else if (Model.DisplayingVersionn.State == 3)
{    
    <p class="text-success">editör son kararı vermek üzere..</p>
    
    <b>bu makale için yaptığınız değerlendirme</b>
    
        foreach (Yglab.Models.Answer ans in Model.EvaluationOfRefree.Answers)
        {
            <h6> @ans.Question.QuestionText </h6>
            @ans.Result
        }
        <br />
        <b>Yorumunuz:</b> <br /> @Model.EvaluationOfRefree.Opinion
}
else if (Model.DisplayingVersionn.State == 4)
{
    <b>bu makale için yaptığınız değerlendirme</b>
    
        foreach (Yglab.Models.Answer ans in Model.EvaluationOfRefree.Answers)
        {
            <h6> @ans.Question.QuestionText </h6>
            @ans.Result
        }
        <br />
        <b>Yorumunuz:</b> <br /> @Model.EvaluationOfRefree.Opinion
    
    <p class="text-success">Editörün verdiği son karar: </p>
    <b>son karar:</b> @Model.DisplayingVersionn.DesicionType <br />
    <text>@Model.DisplayingVersionn.EditorOpinion </text>
}

@if (Model.PreviousVersionn != null)
{
    <br /><br />
    @Html.RouteLink("önceki versiyon", "Journal", new { controller = "Journal", action = "Versionn", journalpath = ViewBag.journalpath, id = Model.PreviousVersionn.Id })
}

@if (Model.NextVersionn != null && Model.NextVersionn.State > 1)
{
    <br /><br />
    @Html.RouteLink("sonraki versiyon", "Journal", new { controller = "Journal", action = "Versionn", journalpath = ViewBag.journalpath, id = Model.NextVersionn.Id })
}